FROM frolvlad/alpine-java:jdk8-slim
VOLUME /tmp
ARG JAR_FILE
COPY ${JAR_FILE} app.jar

# JAVA环境变量
ENV JAVA_OPTS=""
# 时区
ENV TZ Asia/Shanghai
# 时区设置
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime

ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS  -Duser.timezone=$TZ -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]